Relative positioning and access of memory objects

ABSTRACT

A garbage collector including a bit mapper operative to designate a plurality of regions within a memory, associate any of a plurality of objects with any of the regions if the start address of the object to be associated lies within the region, and record the relative location of a group of objects within any of the regions, a mover operative to relocate any of the groups of objects found within a source region from among the regions to begin at a destination address, and a fixer operative to record the destination address at an index corresponding to the source region.

FIELD OF THE INVENTION

The present invention relates to computer memory garbage collection ingeneral, and more particularly to object relocation and reference fixup.

BACKGROUND OF THE INVENTION

Computer operating environments, such as the Java Virtual Machine (JVM),typically provide a mechanism for applications to store “objects” ofdata. Often, the operating environment dynamically allocates a sectionof memory for utilization by the application into which the applicationplaces its objects. In the course its execution, an application may nolonger require an object, allowing the object's location in memory to bereclaimed for storing other objects. This process of reclamation ispopularly known as garbage collection (GC).

Garbage collectors from the mark-sweep family suffer from memoryfragmentation, the creation of relatively small holes of unused spacebetween objects. To reduce fragmentation the GC may compact memory byreducing the space between objects and thus create chunks of larger freespace, making allocation more efficient, and practically reducing thememory footprint of the application. During compaction, “fixup” ofobject memory addresses is typically performed to keep track of eachobject's new location for future reference.

Unfortunately, compaction algorithms tend to require large amounts ofauxiliary data structures, such as forwarding references or breaktables. Moreover when searching for a previously stored objects,forwarding references may require additional auxiliary memory accesses.

SUMMARY OF THE INVENTION

The present invention discloses a system and method for relativepositioning of memory objects.

In one aspect of the present invention a garbage collector is providedincluding a bit mapper operative to designate a plurality of regionswithin a memory, associate any of a plurality of objects with any of theregions if the start address of the object to be associated lies withinthe region, and record the relative location of a group of objectswithin any of the regions, a mover operative to relocate any of thegroups of objects found within a source region from among the regions tobegin at a destination address, and a fixer operative to record thedestination address at an index corresponding to the source region.

In another aspect of the present invention the bit mapper is operativeto construct an old relative location bitmap including a series of bits,with each bit o_(n) positionally corresponding to a block b_(n) in thememory.

In another aspect of the present invention the bit mapper is operativeto set any of the bits to indicate that the corresponding block includesthe start address of any of the objects that lay within the sourceregion.

In another aspect of the present invention the mover is operative tocompact the group of objects.

In another aspect of the present invention the mover is operative topreserve the relative order and position of the objects within the groupof objects to one another.

In another aspect of the present invention the mover is operative torelocate the group of objects such that no other object from outside thegroup of objects is inserted between objects within the relocated group.

In another aspect of the present invention the bit mapper is operativeto construct a new relative location bitmap including a series of bits,with each bit o_(n) positionally corresponding to a block b_(n) in thememory.

In another aspect of the present invention the bit mapper is operativeto set any of the bits to indicate that the corresponding block includesthe start address of any of the relocated objects.

In another aspect of the present invention the fixer further includes acalculator operative to determine the new start address of a desiredobject among any of the relocated objects.

In another aspect of the present invention the fixer is operative toreassign a pointer to any of the objects in the source region to theaddress of the object after the object is relocated.

In another aspect of the present invention the calculator is operativeto receive the old start address of the desired object, determine thesource region within which the desired object originated, determine therelative position of the desired object within the source region,determine the new start address of the first object in the relocatedgroup of objects, determine the block in which the start address of thedesired object lies as being at the same relative position from thedestination address as in the source region, and calculate the currentaddress of the desired object by adding multiples of the block size tothe new start address until the block in which the start address of thedesired object lies is reached.

In another aspect of the present invention a garbage collector isprovided including a bit mapper operative to designate a plurality ofregions within a memory, and associate any of a plurality of objectswith any of the regions if the start address of the object to beassociated lies within the region, a mover operative to relocate eachobject in a group of the objects found within a source region from amongthe regions at an offset within the memory from its current location inthe source region such that the distances between the objects within thegroup are preserved, and a fixer operative to record the offset at anindex corresponding to the source region.

In another aspect of the present invention the mover is operative topreserve the relative order and position of the objects within the groupof objects to one another.

In another aspect of the present invention the mover is operative torelocate the group of objects such that no other object from outside thegroup of objects are inserted between objects within the relocatedgroup.

In another aspect of the present invention the fixer further includes acalculator operative to determine the new start address of a desiredobject among any of the moved objects.

In another aspect of the present invention the fixer is operative toreassign a pointer to any of the objects in the source region to theaddress of the object at the offset.

In another aspect of the present invention the calculator is operativeto receive the old start address of the desired object, determine thesource region within which the desired object originated, determine theoffset corresponding to the source region, and calculate the currentaddress of the desired object by adding the offset to the old startaddress.

In another aspect of the present invention a method is provided forrelative positioning of memory objects, the method including designatinga plurality of regions within a memory, associating any of a pluralityof objects with any of the regions if the start address of the object tobe associated lies within the region, recording the relative location ofa group of objects within any of the regions, relocating any of thegroups of objects found within a source region from among the regions tobegin at a destination address, and storing the destination address atan index corresponding to the source region.

In another aspect of the present invention the recording step includesconstructing an old relative location bitmap including a series of bits,with each bit o_(n) positionally corresponding to a block b_(n) in thememory.

In another aspect of the present invention the recording step includessetting any of the bits to indicate that the corresponding blockincludes the start address of any of the objects that lay within thesource region.

In another aspect of the present invention the relocating step includescompact the group of objects.

In another aspect of the present invention the relocating step includespreserving the relative order and position of the objects within thegroup of objects to one another.

In another aspect of the present invention the relocating step includesrelocating the group of objects such that no other object from outsidethe group of objects is inserted between objects within the relocatedgroup.

In another aspect of the present invention the method further includesconstructing a new relative location bitmap including a series of bits,with each bit o_(n) positionally corresponding to a block b_(n) in thememory.

In another aspect of the present invention the method further includessetting any of the bits to indicate that the corresponding blockincludes the start address of any of the relocated objects.

In another aspect of the present invention the method further includesdetermining the new start address of a desired object among any of therelocated objects.

In another aspect of the present invention the method further includesreassigning a pointer to any of the objects in the source region to theaddress of the object after the object is relocated.

In another aspect of the present invention the determining step includesreceiving the old start address of the desired object, determining thesource region within which the desired object originated, determiningthe relative position of the desired object within the source region,determining the new start address of the first object in the relocatedgroup of objects, determining the block in which the start address ofthe desired object lies as being at the same relative position from thedestination address as in the source region, and calculating the currentaddress of the desired object by adding multiples of the block size tothe new start address until the block in which the start address of thedesired object lies is reached.

In another aspect of the present invention a method is provided forrelative positioning of memory objects, the method including designatinga plurality of regions within a memory, and associating any of aplurality of objects with any of the regions if the start address of theobject to be associated lies within the region, relocating each objectin a group of the objects found within a source region from among theregions at an offset within the memory from its current location in thesource region such that the distances between the objects within thegroup are preserved, and storing the offset at an index corresponding tothe source region.

In another aspect of the present invention the relocating step includespreserving the relative order and position of the objects within thegroup of objects to one another.

In another aspect of the present invention the relocating step includesrelocating the group of objects such that no other object from outsidethe group of objects are inserted between objects within the relocatedgroup.

In another aspect of the present invention the method further includesdetermining the new start address of a desired object among any of themoved objects.

In another aspect of the present invention the method further includesreassigning a pointer to any of the objects in the source region to theaddress of the object at the offset.

In another aspect of the present invention the determining step includesreceiving the old start address of the desired object, determining thesource region within which the desired object originated, determiningthe offset corresponding to the source region, and calculating thecurrent address of the desired object by adding the offset to the oldstart address.

In another aspect of the present invention a computer program isprovided embodied on a computer-readable medium, the computer programincluding a first code segment operative to designate a plurality ofregions within a memory, a second code segment operative to associateany of a plurality of objects with any of the regions if the startaddress of the object to be associated lies within the region, a thirdcode segment operative to record the relative location of a group ofobjects within any of the regions, a fourth code segment operative torelocate any of the groups of objects found within a source region fromamong the regions to begin at a destination address, and a fifth codesegment operative to store the destination address at an indexcorresponding to the source region.

In another aspect of the present invention a computer program isprovided embodied on a computer-readable medium, the computer programincluding a first code segment operative to designate a plurality ofregions within a memory, and a second code segment operative toassociate any of a plurality of objects with any of the regions if thestart address of the object to be associated lies within the region, athird code segment operative to relocate each object in a group of theobjects found within a source region from among the regions at an offsetwithin the memory from its current location in the source region suchthat the distances between the objects within the group are preserved,and a fourth code segment operative to storing the offset at an indexcorresponding to the source region.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be understood and appreciated more fully fromthe following detailed description taken in conjunction with theappended drawings in which:

FIG. 1A is a simplified block diagram of a computer system, useful inunderstanding the present invention;

FIG. 1B is a pictorial representation of memory storage, useful inunderstanding the present invention;

FIG. 2A is a simplified block diagram of a memory compaction and fixupsystem, constructed and operative in accordance with a preferredembodiment of the present invention;

FIG. 2B is a pictorial representation of memory storage of an exemplarymemory storage configuration prior to compaction and fixup, constructedand operative in accordance with a preferred embodiment of the presentinvention;

FIG. 2C is a simplified pictorial representation of an exemplary memorystorage configuration after compaction and fixup, constructed andoperative in accordance with a preferred embodiment of the presentinvention;

FIG. 2D is a simplified flow chart illustration of a method forcompaction and fixup, operative in accordance with a preferredembodiment of the present invention;

FIG. 3A is a simplified block diagram of a compacted object locationsystem, constructed and operative in accordance with a preferredembodiment of the present invention;

FIG. 3B is a pictorial representation of an exemplary compact memorystorage configuration, constructed and operative in accordance with apreferred embodiment of the present invention;

FIG. 3C is a simplified flow chart illustration of a method forcompacted object location, operative in accordance with a preferredembodiment of the present invention;

FIG. 4A is a pictorial representation an exemplary memory storageconfiguration prior to relocation and fixup, constructed and operativein accordance with a preferred embodiment of the present invention;

FIG. 4B is a simplified pictorial representation of an exemplary memorystorage configuration after relocation and fixup, constructed andoperative in accordance with a preferred embodiment of the presentinvention; and

FIG. 4C a simplified flow chart illustration of a method for relocationand fixup, operative in accordance with a preferred embodiment of thepresent invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Reference is now made to FIG. 1A, which is a simplified block diagram ofa computer system, and additionally to FIG. 1B, which is a simplifiedpictorial representation of memory storage, both useful in understandingthe present invention. A typical Computer System 100 includes aProcessor 110 and a Memory 120, such as Heap Memory. Processor 110typically processes data and stores data objects in Memory 120 for laterretrieval.

Memory 120 typically includes one or more contiguous Blocks 130 ofmemory, each block denoted as B_(n). Each Block 130 is typically of afixed size of n bytes, and may be used to store an Object 140 or partthereof. Preferably, the start of each Object 140 is aligned with thestart of a Block 130.

Computer System 100 may utilize an Available Block Bitmap 150 to helpidentify blocks in Memory 120 in which objects are stored. AvailableBlock Bitmap 150 is typically composed of a memory bit vector where thefirst bit M₁ in Available Block Bitmap 150 positionally corresponds tothe first Block B₁ in Memory 120, the second bit M₂ in Available BlockBitmap 150 positionally corresponds to the second Block B₂ in Memory120, and so on (the scale of Available Block Bitmap 150 and of Memory120 are not depicted equally in FIG. 1B). Each bit M_(i) is typicallyset, such as to 1, if an Object 140 or a part thereof occupies itscorresponding block B_(i), or “unset,” such as to 0, if thecorresponding block B_(i) is not used for storing an object. In thismanner Available Block Bitmap 150 provides a means for determining theavailability of blocks in Memory 120 for storing new objects.

Reference is now made to FIG. 2A, which is a simplified block diagram ofa memory compaction and fixup system, FIG. 2B, which is a simplifiedpictorial representation of an exemplary memory storage configurationprior to compaction and fixup, FIG. 2C, which is a simplified pictorialrepresentation of an exemplary memory storage configuration aftercompaction and fixup, and to FIG. 2D, which is a simplified flow chartillustration of a method for compaction and fixup, constructed andoperative in accordance with preferred embodiments of the presentinvention.

Computer System 100 may employ an operating environment, such as a JavaVirtual Machine (JVM), to provide an execution environment for anApplication 200 and a Garbage Collector 210 to compact Memory 120. Inthe course of execution, Application 200 may store one or more Objects140 in Memory 120. For Example, FIG. 2 b depicts a series of Objects140, labeled Object₁ through Object₅, stored in Memory 120.

Garbage Collector 210 preferably includes a Bit Mapper 220, a Mover 230and a Fixer 240. Bit Mapper 220 typically designates one or more Regions250 within Memory 120 such that each Region 250 is of a predefined size,and preferably of approximately equal size. Bit Mapper 220 may thenassociate one or more Objects 140 with a particular Region 250 if thestart address of the Object 140 lies within the Region 250.

In FIG. 2 b, Memory 120 is shown as having three regions designatedRegion₁, Region₂ and Region₃. Region₁ defines an unused section ofMemory 120 that includes Blocks B₁ through B₅. Region₂ defines a sectionof Memory 120 that includes Blocks B₆ through B₁₀ and includes the startaddresses of Object₁ and Object₂. Region₃ defines a section of Memory120 that includes Blocks B₁₁ through B₁₅ and includes the startaddresses of Object₃, Object₄ and Object₅.

During compaction, Mover 230 typically chooses a source region in Memory120, such as Region₃, and a destination address in Memory 120 an addressin Region₁. The destination address may lie in the same region as thesource region or in a different region, and need not coincide with aregion boundary, but should preferably coincide with a block boundary.Bit Mapper 220 typically constructs an Old Relative Location Bitmap 260similar to Available Block Bitmap 150, with each bit O_(n) positionallycorresponding to a block B_(n) in Memory 120. However, unlike AvailableBlock Bitmap 150, each of the set bits in Old Relative Location Bitmap260 indicates that a corresponding block in Memory 120 includes thestart address of an Object 140. Bit Mapper 220 set the bits in OldRelative Location Bitmap 260 that are associated with the Objects 140that lay within the source region chosen by Mover 230. Thus, in FIG. 2B,set bits O₁₁, O₁₃ and O₁₅ correspond to the start address of Object₃,Object₄ and Object₅ respectively.

Mover 230 typically moves and compacts Objects 140 located in the sourceregion to the destination address. Preferably, one or more Objects 140in the source region are moved as a group to the destination address,including all objects between the first and last objects in the group asit appears in the source region, where the relative order and positionof the Objects 140 to one another are preserved, although the distancesbetween the Objects 140 may be reduced or eliminated, and where no otherobjects from outside the group are inserted between objects within thegroup. Thus, in FIG. 2C, the relative position of Object₃, Object₄ andObject₅ within Memory 120 is preserved after they have been moved fromRegion₃ and compacted into Region₁.

Fixer 240 then places the new start address of the first Object 140 inthe group of objects, being the destination address, into an OffsetVector 270 at an index corresponding to the source Region prior to thegroup of objects being moved. Thus, in FIG. 2C, the index of OffsetVector 270 corresponding to source Region₃ is used to store the startaddress B₁ of Object₃ in Region₁.

Bit Mapper 220 typically constructs a New Relative Location Bitmap 280that is similar to Old Relative Location Bitmap 260, with each bit N_(n)positionally corresponding to a block B_(n) in Memory 120. New RelativeLocation Bitmap 280 preferably indicates blocks in Memory 120 in whichthe start address of moved Objects 140 are found. Thus, in FIG. 2C, N₁,N₃ and N₄ in New Relative Location Bitmap 280 are set, such as to 1, tocorrespond to the blocks B₁, B₃ and B₄ that include the start address ofObject₃, Object₄ and Object₅ respectively.

Reference is now made to FIG. 3A, which is a simplified block diagram ofa compacted object location system, FIG. 3B, which is a pictorialrepresentation of an exemplary compact memory storage configuration, andto FIG. 3C, which is a simplified flow chart illustration of a methodfor compacted object location, constructed and operative in accordancewith preferred embodiments of the present invention.

In addition to the elements described hereinabove with reference to FIG.2A, Garbage Collector 210 may employ Fixer 240 to reassign pointers tothe objects within Memory 120 during compaction by utilizing aCalculator 300 to determine the new start address of an object asfollows.

Calculator 300 receives the old start address of the desired Object 140,and queries Bit Mapper 220 to determine the old Region 250 within whichthe desired Object 140 resided. Bit Mapper 220 consults Old RelativeLocation Bitmap 260 to determine the relative position of the desiredObject 140 within Region 250. Calculator 300 queries Fixer 240, which inturn consults Offset Vector 270 for the new start address of the firstObject 140 in the group of objects that were relocated from the oldRegion 250 to the destination address within Memory 120.

Given that the relative position of the desired Object 140 among therelocated group of objects is the same in both its old and new locationsas the n-th object in the group of objects, Calculator 300 queries BitMapper 220 which consults New Relative Location Bitmap 280 andidentifies the n-th set bit from the block corresponding to the newstarting address of the first object in the relocated group of objectsas corresponding to the block in which the start address of the desiredObject 140 lies. The current address of the desired Object 140 may thenbe calculated by adding multiples of the block size to the new startaddress of the first Object 140 in the relocated group of objects untilthe block corresponding to the n-th set bit is reached.

Thus, in FIG. 3B, to fix the pointers to Object₅ in Memory 120, the oldstart address of Object₅, B₁₅, is first determined. The old Region 250within which Object₅ resided, Region₃, is also determined, and OldRelative Location Bitmap 260 is consulted to determine the relativeposition of Object₅ within Region₃, which in FIG. 2B is shown as thethird Object 140 within Region₃.

Offset Vector 270 is then consulted to determine the new start addressof the first object in the relocated group of objects that werepreviously in Region₃ within Memory 120, now being B₁.

New Relative Location Bitmap 280 is then consulted to determine theaddress of the block in Region, corresponding to the third Object 140 inthe region, being block B₄. Three block lengths are then added toaddress B₁, yielding the start address of block B₄, and thus the startaddress of Object₅, which may be employed to adjust the pointers to theObject 140.

One method for determining the relative position of a desired Object 140is to traverse Old Relative Location Bitmap 260, counting the number ofset bits starting from the first Object 140 in the Region 250, i.e.Object₃ in Region₃.

Yet another method for determining the relative location of a desiredObject 140 is to directly traverse the Objects 140 in Memory 120. Whilethis methodology requires Memory 120 to store the size of each Object140, there is no need for New Relative Location Bitmap 280. Bit Mapper220 may traverse Memory 120, counting the memory Objects 140 as they areencountered, starting at the new start address of the first object inthe relocated group of objects.

Reference is now made to FIG. 4A, which is a simplified pictorialrepresentation of an exemplary memory storage configuration prior torelocation and fixup, to FIG. 4B, which is a simplified pictorialrepresentation of an exemplary memory storage configuration afterrelocation and fixup, and to FIG. 4C, which is a simplified flow chartillustration of a method for relocation and fixup, constructed andoperative in accordance with preferred embodiments of the presentinvention. FIGS. 4A, 4B, and 4C are similar to FIGS. 2A, 2B, and 2Crespectively, with the notable exception that during the relocationphase each object in a group of Objects 140 located in the source regionare relocated at an offset from its current location in the sourceregion preferably such that the distances between the Objects within thegroup are preserved. An Address Offset Vector 400 corresponding to thesource region is used to store the offset of the new location of eachobject relative to its previous location. For example, in FIG. 4B,Object₃, Object₄ and Object₅ are relocated from Region₃ to a destinationaddress at an offset of minus eleven blocks. The address offset, minuseleven blocks of memory, is stored in Address Offset Vector 400.

During the fixup stage, the address of a desired Object 140 iscalculated by adding the Address Offset Vector 400 corresponding to thedesired object's previous region to the object's previous address. Inthe example presented hereinabove Object₅ is located eleven blocks fromits original location, thus pointers to Object₅, which previouslypointed to B₁₅ are adjusted to point to B₄.

It is appreciated that one or more of the steps of any of the methodsdescribed herein may be omitted or carried out in a different order thanthat shown, without departing from the true spirit and scope of theinvention.

While the methods and apparatus disclosed herein may or may not havebeen described with reference to specific computer hardware or software,it is appreciated that the methods and apparatus described herein may bereadily implemented in computer hardware using conventional techniques.

While the present invention has been described with reference to one ormore specific embodiments, the description is intended to beillustrative of the invention as a whole and is not to be construed aslimiting the invention to the embodiments shown. It is appreciated thatvarious modifications may occur to those skilled in the art that, whilenot specifically shown herein, are nevertheless within the true spiritand

1. A garbage collector comprising: a bit mapper operative to: designatea plurality of regions within a memory, associate any of a plurality ofobjects with any of said regions if the start address of said object tobe associated lies within said region, and record the relative locationof a group of objects within any of said regions; a mover operative torelocate any of said groups of objects found within a source region fromamong said regions to begin at a destination address; and a fixeroperative to record said destination address at an index correspondingto said source region.
 2. A garbage collector according to claim 1wherein said bit mapper is operative to construct an old relativelocation bitmap comprising a series of bits, with each bit o_(n)positionally corresponding to a block b_(n) in said memory.
 3. A garbagecollector according to claim 2 wherein said bit mapper is operative toset any of said bits to indicate that said corresponding block includesthe start address of any of said objects that lay within said sourceregion.
 4. A garbage collector according to claim 1 wherein said moveris operative to compact said group of objects.
 5. A garbage collectoraccording to claim 1 wherein said mover is operative to preserve therelative order and position of the objects within said group of objectsto one another.
 6. A garbage collector according to claim 1 wherein saidmover is operative to relocate said group of objects such that no otherobject from outside said group of objects is inserted between objectswithin said relocated group
 7. A garbage collector according to claim 1wherein said bit mapper is operative to construct a new relativelocation bitmap comprising a series of bits, with each bit o_(n)positionally corresponding to a block b_(n) in said memory.
 8. A garbagecollector according to claim 7 wherein said bit mapper is operative toset any of said bits to indicate that said corresponding block includesthe start address of any of said relocated objects.
 9. A garbagecollector according to claim 1 wherein said fixer further comprises acalculator operative to determine the new start address of a desiredobject among any of said relocated objects.
 10. A garbage collectoraccording to claim 9 wherein said fixer is operative to reassign apointer to any of said objects in said source region to the address ofsaid object after said object is relocated.
 11. A garbage collectoraccording to claim 9 wherein said calculator is operative to: receivethe old start address of said desired object, determine the sourceregion within which said desired object originated, determine therelative position of said desired object within said source region,determine the new start address of the first object in said relocatedgroup of objects, determine the block in which the start address of saiddesired object lies as being at the same relative position from saiddestination address as in said source region, and calculate the currentaddress of said desired object by adding multiples of the block size tosaid new start address until the block in which the start address ofsaid desired object lies is reached.
 12. A garbage collector comprising:a bit mapper operative to: designate a plurality of regions within amemory, and associate any of a plurality of objects with any of saidregions if the start address of said object to be associated lies withinsaid region; a mover operative to relocate each object in a group ofsaid objects found within a source region from among said regions at anoffset within said memory from its current location in the source regionsuch that the distances between the objects within said group arepreserved; and a fixer operative to record said offset at an indexcorresponding to said source region.
 13. A garbage collector accordingto claim 12 wherein said mover is operative to preserve the relativeorder and position of the objects within said group of objects to oneanother.
 14. A garbage collector according to claim 12 wherein saidmover is operative to relocate said group of objects such that no otherobject from outside said group of objects are inserted between objectswithin said relocated group.
 15. A garbage collector according to claim12 wherein said fixer further comprises a calculator operative todetermine the new start address of a desired object among any of saidmoved objects.
 16. A garbage collector according to claim 15 whereinsaid fixer is operative to reassign a pointer to any of said objects insaid source region to the address of said object at said offset.
 17. Agarbage collector according to claim 15 wherein said calculator isoperative to: receive the old start address of said desired object,determine the source region within which said desired object originated,determine the offset corresponding to said source region, and calculatethe current address of said desired object by adding said offset to saidold start address.
 18. A method for relative positioning of memoryobjects, the method comprising: designating a plurality of regionswithin a memory, associating any of a plurality of objects with any ofsaid regions if the start address of said object to be associated lieswithin said region; recording the relative location of a group ofobjects within any of said regions; relocating any of said groups ofobjects found within a source region from among said regions to begin ata destination address; and storing said destination address at an indexcorresponding to said source region.
 19. A method according to claim 18wherein said recording step comprises constructing an old relativelocation bitmap comprising a series of bits, with each bit o_(n)positionally corresponding to a block b_(n) in said memory.
 20. A methodaccording to claim 19 wherein said recording step comprises setting anyof said bits to indicate that said corresponding block includes thestart address of any of said objects that lay within said source region.21. A method according to claim 18 wherein said relocating stepcomprises compact said group of objects.
 22. A method according to claim18 wherein said relocating step comprises preserving the relative orderand position of the objects within said group of objects to one another.23. A method according to claim 18 wherein said relocating stepcomprises relocating said group of objects such that no other objectfrom outside said group of objects is inserted between objects withinsaid relocated group
 24. A method according to claim 18 and furthercomprising constructing a new relative location bitmap comprising aseries of bits, with each bit o_(n) positionally corresponding to ablock b_(n) in said memory.
 25. A method according to claim 24 andfurther comprising setting any of said bits to indicate that saidcorresponding block includes the start address of any of said relocatedobjects.
 26. A method according to claim 18 and further comprisingdetermining the new start address of a desired object among any of saidrelocated objects.
 27. A method according to claim 26 and furthercomprising reassigning a pointer to any of said objects in said sourceregion to the address of said object after said object is relocated. 28.A method according to claim 26 wherein said determining step comprises:receiving the old start address of said desired object, determining thesource region within which said desired object originated, determiningthe relative position of said desired object within said source region,determining the new start address of the first object in said relocatedgroup of objects, determining the block in which the start address ofsaid desired object lies as being at the same relative position fromsaid destination address as in said source region, and calculating thecurrent address of said desired object by adding multiples of the blocksize to said new start address until the block in which the startaddress of said desired object lies is reached.
 29. A method forrelative positioning of memory objects, the method comprising:designating a plurality of regions within a memory, and associating anyof a plurality of objects with any of said regions if the start addressof said object to be associated lies within said region; relocating eachobject in a group of said objects found within a source region fromamong said regions at an offset within said memory from its currentlocation in the source region such that the distances between theobjects within said group are preserved; and storing said offset at anindex corresponding to said source region.
 30. A method according toclaim 29 wherein said relocating step comprises preserving the relativeorder and position of the objects within said group of objects to oneanother.
 31. A method according to claim 29 wherein said relocating stepcomprises relocating said group of objects such that no other objectfrom outside said group of objects are inserted between objects withinsaid relocated group.
 32. A method according to claim 29 and furthercomprising determining the new start address of a desired object amongany of said moved objects.
 33. A method according to claim 32 andfurther comprising reassigning a pointer to any of said objects in saidsource region to the address of said object at said offset.
 34. A methodaccording to claim 32 wherein said determining step comprises: receivingthe old start address of said desired object, determining the sourceregion within which said desired object originated, determining theoffset corresponding to said source region, and calculating the currentaddress of said desired object by adding said offset to said old startaddress.
 35. A computer program embodied on a computer-readable medium,the computer program comprising: a first code segment operative todesignate a plurality of regions within a memory, a second code segmentoperative to associate any of a plurality of objects with any of saidregions if the start address of said object to be associated lies withinsaid region; a third code segment operative to record the relativelocation of a group of objects within any of said regions; a fourth codesegment operative to relocate any of said groups of objects found withina source region from among said regions to begin at a destinationaddress; and a fifth code segment operative to store said destinationaddress at an index corresponding to said source region.
 36. A computerprogram embodied on a computer-readable medium, the computer programcomprising: a first code segment operative to designate a plurality ofregions within a memory, and a second code segment operative toassociate any of a plurality of objects with any of said regions if thestart address of said object to be associated lies within said region; athird code segment operative to relocate each object in a group of saidobjects found within a source region from among said regions at anoffset within said memory from its current location in the source regionsuch that the distances between the objects within said group arepreserved; and a fourth code segment operative to storing said offset atan index corresponding to said source region.